package calao.client;

import calao.client.ui.Link;

public class WorkspaceShortcut 
extends Shortcut
{

	final Desktop desktop;
	
	protected WorkspaceShortcut(Desktop desktop) 
	{
		super("calao.Workspaces", desktop.text.workspaces(), desktop.images.group());
		this.desktop = desktop;
	}
	
	public void init()
	{
		final WorkspaceTree wsTree = new WorkspaceTree();
		getMenuPanel().add(new Link(desktop.text.newWorkspace()) {
			public void onClick() {
				desktop.setView(new WorkspaceWizard(desktop, wsTree));
			}
		});
		setContent(wsTree);		
	}

}
